package com.cskaoyan.market.admin.service.impl;

import com.cskaoyan.market.admin.service.AdminStorageService;
import org.apache.ibatis.session.SqlSession;

import com.cskaoyan.market.db.domain.MarketStorage;
import com.cskaoyan.market.db.mapper.MarketStorageMapper;
import com.cskaoyan.market.util.MyBatisUtil;

/**
 * @author BlackFlame33
 * @date 2023/03/21
 **/
public class AdminStorageServiceImpl implements AdminStorageService {
    @Override
    public void createImage(MarketStorage storage) {
        SqlSession session = MyBatisUtil.getSession();
        MarketStorageMapper mapper = session.getMapper(MarketStorageMapper.class);
        mapper.insert(storage);
        session.commit();
        session.close();
    }
}